<?php
declare (strict_types=1);

namespace app\exam\model;

use app\common\model\BaseModel;

/**
 * 套卷试卷关联模型
 */
class RollupPaper extends BaseModel
{
    /**
     * 表名
     *
     * @var string
     */
    protected $name = 'exam_module_rollup_paper';

    /**
     * 定义字段类型
     * @var [type]
     */
    protected $type = [
        'create_time'   => 'intger',
        'update_time'   => 'intger',
    ];

    protected $hidden = ['create_time', 'update_time'];

    /**
     * 关联试卷
     * Author 亓官雨树<lucky.max@foxmail.com>
     * Date 2021-03-31
     * @return [type]
     */
    public function paper()
    {
        return $this->belongsTo(Paper::class, 'paper_id');
    }
    
}